<head>
    <meta charset="utf-8" />
    <title>出错啦...</title>
</head>

<body>
    <?php echo $msg; ?>
        即将跳转到:
        <a id="href" href="javascript::void();" onclick="window.history.back(-1);">
            出错页面
        </a>
        等待时间: <span id="wait">3</span>

        <script type="text/javascript">
            (function() {
                var wait = document.getElementById('wait');
                var href = document.getElementById('href').href;
                var interval = setInterval(function() {
                    var time = --wait.innerHTML;
                    if (time <= 0) {
                        window.history.go(-1);
                        clearInterval(interval);
                    };
                }, 1000);
            })();
        </script>
</body>

</html>